Optimal. Leaf size=174 \[ \frac {2 \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}-\frac {2 \sin (c+d x) \cos ^2(c+d x)}{35 d \sqrt {a \cos (c+d x)+a}}+\frac {62 \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{105 a d}-\frac {148 \sin (c+d x)}{105 d \sqrt {a \cos (c+d x)+a}}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.37, antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2778, 2983, 2968, 3023, 2751, 2649, 206} \[ \frac {2 \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}-\frac {2 \sin (c+d x) \cos ^2(c+d x)}{35 d \sqrt {a \cos (c+d x)+a}}+\frac {62 \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{105 a d}-\frac {148 \sin (c+d x)}{105 d \sqrt {a \cos (c+d x)+a}}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2751
Rule 2778
Rule 2968
Rule 2983
Rule 3023
Rubi steps
\begin {align*} \int \frac {\cos ^4(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx &=\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {\int \frac {\cos ^2(c+d x) (-6 a+a \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx}{7 a}\\ &=-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {2 \int \frac {\cos (c+d x) \left (2 a^2-\frac {31}{2} a^2 \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{35 a^2}\\ &=-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {2 \int \frac {2 a^2 \cos (c+d x)-\frac {31}{2} a^2 \cos ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{35 a^2}\\ &=-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {62 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 a d}-\frac {4 \int \frac {-\frac {31 a^3}{4}+\frac {37}{2} a^3 \cos (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{105 a^3}\\ &=-\frac {148 \sin (c+d x)}{105 d \sqrt {a+a \cos (c+d x)}}-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {62 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 a d}+\int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx\\ &=-\frac {148 \sin (c+d x)}{105 d \sqrt {a+a \cos (c+d x)}}-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {62 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 a d}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {148 \sin (c+d x)}{105 d \sqrt {a+a \cos (c+d x)}}-\frac {2 \cos ^2(c+d x) \sin (c+d x)}{35 d \sqrt {a+a \cos (c+d x)}}+\frac {2 \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {62 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 130, normalized size = 0.75 \[ \frac {\cos \left (\frac {1}{2} (c+d x)\right ) \left (-525 \sin \left (\frac {1}{2} (c+d x)\right )+175 \sin \left (\frac {3}{2} (c+d x)\right )-21 \sin \left (\frac {5}{2} (c+d x)\right )+15 \sin \left (\frac {7}{2} (c+d x)\right )-420 \log \left (\cos \left (\frac {1}{4} (c+d x)\right )-\sin \left (\frac {1}{4} (c+d x)\right )\right )+420 \log \left (\sin \left (\frac {1}{4} (c+d x)\right )+\cos \left (\frac {1}{4} (c+d x)\right )\right )\right )}{210 d \sqrt {a (\cos (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.29, size = 153, normalized size = 0.88 \[ \frac {4 \, {\left (15 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )^{2} + 31 \, \cos \left (d x + c\right ) - 43\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right ) + \frac {105 \, \sqrt {2} {\left (a \cos \left (d x + c\right ) + a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - \frac {2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}}}{210 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.25, size = 118, normalized size = 0.68 \[ -\frac {\sqrt {2} {\left (\frac {105 \, \log \left ({\left | -\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {a}} + \frac {8 \, {\left (35 \, a^{3} + {\left (23 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 28 \, a^{3}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{\frac {7}{2}}}\right )}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.46, size = 194, normalized size = 1.11 \[ \frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-240 \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+336 \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-280 \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+105 \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a \right )}{105 a^{\frac {3}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\cos \left (c+d\,x\right )}^4}{\sqrt {a+a\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________